import java.util.Date;


public abstract class transaction 
{
	double moneyRecieved;
	Date today;
	transaction next;
	
	public transaction()
	{
		today = new Date();
		next = null;
	}
	public double getMoneyRecieved()
	{
		return moneyRecieved;
		
	}
	public void setNext(transaction nex)
	{
		next = nex;
	}
	
	public transaction getNext()
	{
		return next;
	}
	public double getProfit()
	{
		return moneyRecieved;
	}
	public double getCost()
	{
		return 0;
	}
	public String toString()
	{
		String temp = "transaction: ";
		temp = temp
			+ today 
			+ " total price: " + getCost()
			+ " money recieved: " + moneyRecieved
			+ " profit: " + getProfit();
		return temp;
	}
	
	
	
}
